<?php
/**
 * --- .login start ---
 * @SWG\Post(
 *    path="/login",
 *    tags={"login"},
 *    summary="登录接口",
 *    description="登录",
 *    produces={"application/json"},
 *     consumes={"application/x-www-form-urlencoded", "application/json"},
 *
 *    @SWG\Parameter(
 *        name = "username",
 *        description = "账号",
 *        in = "formData",
 *        type = "string",
 *        required = true
 *    ),
 *
 *    @SWG\Parameter(
 *        name = "password_hash",
 *        description = "密码",
 *        in = "formData",
 *        type = "string",
 *        required = true
 *    ),
 *
 *    @SWG\Response(
 *        response = "200",
 *        description = "success",
 *        @SWG\Schema(ref="#/definitions/LoginTokenSuccess")
 *    ),
 *
 *    @SWG\Response(
 *        response = "default",
 *        description = "请求失败， http status 强行转为200, 通过code判断",
 *        @SWG\Schema(ref="#/definitions/ErrorDefault")
 *    )
 * )
 *
 * @SWG\Definition(
 *    definition = "LoginTokenSuccess",
 *
 *    @SWG\Property(
 *        property = "success",
 *        description = "success",
 *        example = "true/false",
 *        type = "boolean"
 *    ),
 *    @SWG\Property(
 *        property = "code",
 *        description = "code",
 *        example = 200,
 *        type = "integer"
 *    ),
 *
 *    @SWG\Property(
 *        property = "message",
 *        description = "提示",
 *        example = "success",
 *        type = "string"
 *    ),
 *
 *    @SWG\Property(
 *        property = "data",
 *        description = "返回数据",
 *        type = "object",
 *        ref = "#/definitions/LoginToken"
 *    )
 * ),
 *
 * @SWG\Definition(
 *    definition = "LoginToken",
 *
 *    @SWG\Property(
 *        property = "id",
 *        description = "用户id",
 *        example = "1",
 *        type = "string"
 *    ),
 *
 *     @SWG\Property(
 *        property = "username",
 *        description = "昵称",
 *        example = "admin",
 *        type = "string"
 *    ),
 *
 *     @SWG\Property(
 *        property = "head_thumb",
 *        description = "头像",
 *        example = "http://xxxx.com",
 *        type = "string"
 *    ),
 *
 *    @SWG\Property(
 *        property = "access_token",
 *        description = "token",
 *        example = "COg3l4O58QEcngm7wt9RKn5KZ9SoHVNt",
 *        type = "string"
 *    ),
 *
 *    @SWG\Property(
 *        property = "refresh_token",
 *        description = "token过期后，刷新token所需要的token",
 *        example = "MoyfO96qDsmTvCHvFc4Qokn8wcAOPDWq",
 *        type = "string"
 *    )
 * )
 * --- .login end ---
 */

/**
 *
 * @SWG\Get(
 *     path="/refresh/{token}",
 *     tags={"login"},
 *     summary="刷新token",
 *     description="刷新token",
 *     produces={"application/json"},
 *
 *     @SWG\Parameter(
 *        in = "path",
 *        name = "token",
 *        description = "刷新token",
 *        required = true,
 *        type = "string"
 *     ),
 *
 *     @SWG\Response(
 *         response = 200,
 *         description = "success",
 *         @SWG\Schema(ref="#/definitions/LoginTokenSuccess")
 *     ),
 *
 *     @SWG\Response(
 *         response = 400,
 *         description = "请求失败， http code 强行转为200,通过code判断",
 *         @SWG\Schema(ref="#/definitions/ErrorDefault")
 *     )
 * )
 */
